package com.tledu.springboots01.controller;

import lombok.AllArgsConstructor;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 * @author Lsj
 * @version 1.0
 * @date 2021/6/30 19:34
 */
@Controller
@AllArgsConstructor
public class DemoController {
    private final JdbcTemplate jdbcTemplate;
    @RequestMapping("index")
    public String index(String name, Model model){
        model.addAttribute("name",name);
        return "index";
    }
}
